import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core';
import { SongSheet } from 'src/app/services/data-types/common.types';

@Component({
  selector: 'app-single-sheet',
  templateUrl: './single-sheet.component.html',
  styleUrls: ['./single-sheet.component.less']
})
export class SingleSheetComponent implements OnInit {


  // 接收单个歌单数据
  @Input() singleSheet!:SongSheet

  // 点击播放歌单发射id
  @Output() onPlay = new EventEmitter<number>();

  constructor() { }

  ngOnInit(): void {
  }
  // 点击播放歌单按钮，把id传给父组件
  playSheet(id:number){
    this.onPlay.emit(id)
  }

}
